<template>
  <div class="pad-20 bgc-default">
    <div class="pad-t-5">
      <div style="line-height: 2.3; background-color: #ECF5FF" class="text-align-l pad-l-20 pad-t-5  pad-b-5">
        <span style="font-size: 16px" class="font-w">申请发票说明：</span><br />
        <span>1、目前只支持纸质发票，暂不支持电子发票。</span><br />
        <span>2、在您提交开票申请后，我们将在<span style="color: #4fc8ff;">3个工作日</span>内为你开票并邮寄给您（不包括快递运输时间），请您耐心等待。</span><br />
        <span>3、开票流程：申请开票 → 审核信息 → 财务开票 → 线下邮寄</span>
      </div>
    </div>
    <div>
      <div class="mar-t-20">
        <div class="tabs-box tab-style-default">
          <el-tabs v-model="activeIndex">
            <el-tab-pane label="申请开票" name="0">
              <InvoiceApply :invoiceMethod="0"></InvoiceApply>
            </el-tab-pane>
            <el-tab-pane label="申请平台代开票" name="1" v-if="enterpriseConfig.platformGenerationInvoiceFlag === 1">
              <InvoiceApply :invoiceMethod="1"></InvoiceApply>
            </el-tab-pane>
          </el-tabs>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="less" scoped>
.tabs-box{
  /deep/ .el-tabs__header{
    background: #fff;
    padding: 0 20px;
  }  
}
</style>

<script>
  import {
    getByEnterpriseId
  } from '@/api/user/enterprise'
  import InvoiceApply from '../components/invoice-apply/index.vue'
  export default {
    directives: {},
    components: {
      InvoiceApply
    },
    data() {
      return {
        activeIndex: 0,
        enterpriseConfig: {
          // 平台代开发票： 0关闭 1开启
          platformGenerationInvoiceFlag: 0
        }
      }
    },
    // 初始化页面
    created() {
      // 获取企业配置
      getByEnterpriseId(this.getEnterpriseId()).then((response) => {
        this.enterpriseConfig = response.data
      })
    },
    mounted() {},
    methods: {

    }
  }
</script>
